//
//  HomeDrawLineTableViewHeaderFooterView.m
//  GLGW_Shoping
//
//  Created by yang on 2018/11/29.
//  Copyright © 2018年 yang. All rights reserved.
//

#import "HomeDrawLineTableViewHeaderFooterView.h"

@implementation HomeDrawLineTableViewHeaderFooterView

-(instancetype)initWithReuseIdentifier:(NSString *)reuseIdentifier{
    if (self = [super initWithReuseIdentifier:reuseIdentifier]) {
        GLGWView * bankgroundView = [[GLGWView alloc] initWithInSuperView:self.contentView];
        bankgroundView.backgroundColor = [UIColor whiteColor];
        [bankgroundView mas_makeConstraints:^(MASConstraintMaker *make) {
            make.bottom.left.right.equalTo(self.contentView).offset(0);
            make.top.equalTo(self.contentView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(10));
        }];
        //
        GLGWLabel * leftTitleLabel = [[GLGWLabel alloc] initWithFont:BOLDSYSTEMFONT(18) theColor:kColor_Rule_Black inSuperView:bankgroundView];
        leftTitleLabel.text = @"价格指导";
        [leftTitleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(bankgroundView.mas_left).offset(kWidthProportion_In_iPhoneTriploid(15));
            make.top.equalTo(bankgroundView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(22));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(25)));
        }];
        //
        GLGWButton * monthBut = [[GLGWButton alloc] initWithTitle:@"11月" titleLableFont:SYSTEMFONT(14) titleLableColor:[UIColor colorWithHexString:@"#666666"] theCornerRadius:3.0 theBorderWidth:1.0 theBorderColor:kColor_Rule_Yellow backgroundColr:[UIColor whiteColor] inSuperView:bankgroundView];
        [monthBut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(bankgroundView.mas_right).offset(-kWidthProportion_In_iPhoneTriploid(20));
            make.top.equalTo(bankgroundView.mas_top).offset(kHeightProportion_In_iPhoneTriploid(20));
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(65)));
            make.height.equalTo(@(kHeightProportion_In_iPhoneTriploid(30)));
        }];
        monthBut.tag = 151;
        [monthBut addTarget:self action:@selector(drawAction:) forControlEvents:UIControlEventTouchUpInside];
        //
        GLGWButton * stellTypeBut = [[GLGWButton alloc] initWithTitle:@"建筑钢材" titleLableFont:SYSTEMFONT(14) titleLableColor:[UIColor colorWithHexString:@"#666666"] theCornerRadius:3.0 theBorderWidth:1.0 theBorderColor:kColor_Rule_Yellow backgroundColr:[UIColor whiteColor] inSuperView:bankgroundView];
        [stellTypeBut mas_makeConstraints:^(MASConstraintMaker *make) {
            make.right.equalTo(monthBut.mas_left).offset(-kWidthProportion_In_iPhoneTriploid(10));
            make.top.equalTo(monthBut);
            make.width.equalTo(@(kWidthProportion_In_iPhoneTriploid(95)));
            make.height.equalTo(monthBut);
        }];
        stellTypeBut.tag = 150;
        [stellTypeBut addTarget:self action:@selector(drawAction:) forControlEvents:UIControlEventTouchUpInside];
    }
    return self;
}

-(void)drawAction:(GLGWButton *)sender{
    if (self.Block_DrawAgarn) {
        self.Block_DrawAgarn(sender);
    }
}

@end
